import Layout from '@/views/layout/index.vue'

export default [
  {
    path: '/main',
    component: Layout,
    redirect: '/main/index',
    name: 'main',
    meta: { title: '首页' },
    children: [
      {
        path: 'index',
        name: 'index',
        component: () => import('@/views/main/index.vue'),
        meta: { title: '首页' }
      }
    ]
  },
  {
    path: '/search',
    component: Layout,
    name: 'search',
    redirect: '/search/index',
    meta: { title: '搜索' },
    children: [
      {
        path: 'index',
        name: 'searchIndex',
        component: () => import('@/views/search/index.vue'),
        meta: { title: '搜索' }
      }
    ]
  },
  {
    path: '/recommend',
    component: Layout,
    redirect: '/recommend/index',
    name: 'recommend',
    meta: { title: '推荐' },
    children: [
      {
        path: 'index',
        name: 'recommendIndex',
        component: () => import('@/views/recommend/index.vue'),
        meta: { title: '推荐' }
      }
    ]
  },
  {
    path: '/applet',
    component: Layout,
    redirect: '/applet/index',
    name: 'applet',
    meta: { title: '小程序' },
    children: [
      {
        path: 'index',
        name: 'appletIndex',
        component: () => import('@/views/applet/index.vue'),
        meta: { title: '小程序' }
      }
    ]
  },
  {
    path: '/aibot',
    component: Layout,
    redirect: '/aibot/index',
    name: 'aibot',
    meta: { title: '职友AI' },
    children: [
      {
        path: 'index',
        name: 'aibotIndex',
        component: () => import('@/views/AIbot/index.vue'),
        meta: { title: '职友AI' }
      }
    ]
  },
  {
    path: '/dynamic',
    component: Layout,
    redirect: '/dynamic/index',
    name: 'dynamic',
    meta: { title: ' 职星会客厅' },
    children: [
      {
        path: 'index',
        name: 'dynamicIndex',
        component: () => import('@/views/dynamic/index.vue'),
        meta: { title: '  职星会客厅' }
      }
    ]
  },
  {
    path: '/learning',
    component: Layout,
    redirect: '/learning/index',
    name: 'learning',
    meta: { title: '  知识星辰阁' },
    children: [
      {
        path: 'index',
        name: 'Index',
        component: () => import('@/views/learning/index.vue'),
        meta: { title: '   知识星辰阁' }
      },
      {
        path: '/course/:id',
        name: 'CourseDetail',
        component: () => import('@/views/learning/CourseDetail.vue'),
        meta: { title: '   知识星辰阁' }
      },
      {
        path: '/coding-problems',
        name: 'CodingProblems',
        component: () => import('@/views/learning/CodingProblems.vue'),
        meta: { title: '   知识星辰阁' }
      },
      {
        path: '/coding-problem/:id',
        name: 'CodingProblemDetail',
        component: () => import('@/views/learning/CodingProblemDetail.vue'),
        meta: { title: '   知识星辰阁' }
      }
    ]
  }

  // { path: '/user', component: () => import('@/views/user/index.vue') }
]
